!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define("rb_wixui.thunderbolt[SlideShowContainer]",["react","reactDOM"],t):"object"==typeof exports?exports["rb_wixui.thunderbolt[SlideShowContainer]"]=t(require("react"),require("react-dom")):e["rb_wixui.thunderbolt[SlideShowContainer]"]=t(e.React,e.ReactDOM)}("undefined"!=typeof self?self:this,(function(e,t){return function(){var n={5329:function(t){"use strict";t.exports=e},95561:function(e){"use strict";e.exports=t},448:function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;tr().createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r().createElement("circle",{cx:"12",cy:"12",r:"11.5",fill:"white",stroke:"black"}),r().createElement("path",{d:"M9.11923 17.4383L9.11916 17.4383C8.85811 17.6003 8.5 17.4181 8.5 17.0757V6.92427C8.5 6.58188 8.85811 6.39972 9.11916 6.56171L9.1192 6.56173L17.3014 11.6379L17.3018 11.6382C17.5657 11.8015 17.5666 12.1984 17.3013 12.3631L9.11923 17.4383Z",stroke:"black"})),c=()=>r().createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r().createElement("circle",{cx:"12",cy:"12",r:"11.5",fill:"white",stroke:"black"}),r().createElement("rect",{x:"9",y:"7",width:"1",height:"10",rx:"0.5",fill:"black"}),r().createElement("rect",{x:"14",y:"7",width:"1",height:"10",rx:"0.5",fill:"black"}));var u="W2bcb7";const d=()=>{};var p=e=>{let{testId:t,className:o,state:i,pauseAriaLabel:s,resumeAriaLabel:p,ariaControls:f,onPause:h=d,onResume:v=d,buttonRef:m}=e;const E="paused"===i,x=(0,n.useMemo)((()=>E?v:h),[E,v,h]);return r().createElement("button",{"data-testid":t,ref:m,className:a(u,o),type:"button","aria-label":E?p:s,"aria-pressed":"playing"===i,"aria-controls":f,onClick:x},E?r().createElement(l,null):r().createElement(c,null))};const f="wixui-",h=(e,...t)=>{const n=[];return e&&n.push(`${f}${e}`),t.forEach((e=>{e&&(n.push(`${f}${e}`),n.push(e))})),n.join(" ")};const v=()=>"function"==typeof window.IntersectionObserver;const m={left:"onSwipeLeft",right:"onSwipeRight",up:"onSwipeUp",down:"onSwipeDown"},E=e=>{if(e.touches&&e.touches.length){const t=e.touches[0];return{x:t.pageX,y:t.pageY}}},x={touched:!0,moved:!1,deltaCoords:{x:0,y:0}},g=(e,t,n)=>()=>{let r;const o=e=>{r={...x,numOfTouches:e.touches.length,startCoords:E(e),startTime:Date.now(),evObj:{...e}}},i=e=>{if(!r)return;const t=E(e);if(t){r.startCoords||(r.startCoords=t);const e=r.startCoords.x-t.x,n=r.startCoords.y-t.y;r.moved=!0,r.deltaCoords={x:e,y:n}}},s=()=>{if(r)if(r.endTime=Date.now(),"onTap"===e&&(e=>e.touched&&!e.moved&&1===e.numOfTouches)(r))t(r.evObj);else if((e=>e.moved&&1===e.numOfTouches&&e.endTime-e.startTime<500&&(Math.abs(e.deltaCoords.x)>100||Math.abs(e.deltaCoords.y)>60))(r)){const n=((e,t)=>{let n;return n=Math.abs(e)>Math.abs(t)?e>0?"left":"right":t>0?"up":"down",n})(r.deltaCoords.x,r.deltaCoords.y);e===m[n]&&t(r.evObj)}};return n&&n.current&&(n.current.addEventListener("touchstart",o,{passive:!0}),n.current.addEventListener("touchmove",i,{passive:!0}),n.current.addEventListener("touchend",s,{passive:!0})),()=>{n&&n.current&&(n.current.removeEventListener("touchstart",o),n.current.removeEventListener("touchmove",i),n.current.removeEventListener("touchend",s))}},b=(e,t,r)=>n.useEffect(g(e,t,r),[e,r,t]),y="Slideshow",C="Next",S="Previous",w="Slides",k="slidesWrapper",N="nextButton",O="prevButton",L="shadowLayer",P="pauseResumeButton",A="NoTransition";var T={root:"slideshow"};var R,M={root:"multi-state-box"},j={thinArrowsSkin:"JMUd8Z","slide-show-container":"mDzRgi",slideShowContainer:"mDzRgi",thinArrowsLargeSelectedCircleSkin:"QodGTM","nav-btn":"XvQ3FE",navBtn:"XvQ3FE","prev-btn":"CdshHv",prevBtn:"CdshHv","next-btn":"Qinjwp",nextBtn:"Qinjwp",slides:"hDJzl4","in-transition":"tAoGqR",inTransition:"tAoGqR","slides-dynamic-height":"T23gn7",slidesDynamicHeight:"T23gn7",shadowLayer:"N2NGoO","dots-nav-section":"lZ5yqT",dotsNavSection:"lZ5yqT","dots-nav-list":"dZxZOk",dotsNavList:"dZxZOk","nav-dot":"ZVUGJp",navDot:"ZVUGJp",selected:"Ale4Rm",playbackControl:"W44q6c",longArrowsLargeSelectedCircleSkin:"ENJ6Ca",squareButtonsSkin:"ghJlnq",StateBoxSkin:"XVHXq_",stateBoxSkin:"XVHXq_"};function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;tnull};var Z=e=>{let{skin:t,direction:r,moveToNextSlide:o,moveToPrevSlide:i,translations:s}=e;const l=q[t],c=n.createElement("button",{"data-testid":O,"aria-label":s.prevButtonAriaLabel||S,onClick:i,className:a(j.navBtn,j.prevBtn)},n.createElement(l,null)),u=n.createElement("button",{"data-testid":N,"aria-label":s.nextButtonAriaLabel||C,onClick:o,className:a(j.navBtn,j.nextBtn)},n.createElement(l,null)),d="rtl"===r;return n.createElement(n.Fragment,null,d?[u,c]:[c,u])};var z=e=>{let{translations:t,currentSlideIndex:r,slidesProps:o,isPlaying:i,focusSlideShow:s,changeSlide:l}=e;return n.createElement("nav",{"aria-label":t.navDotsAriaLabel||w,className:j.dotsNavSection},n.createElement("ol",{className:j.dotsNavList},o.map(((e,t)=>((e,t)=>n.createElement("li",{key:e.id,"aria-current":t===r?"true":void 0},n.createElement("a",{href:"./#"+e.id,"aria-label":e.title,onClick:e=>{e.preventDefault(),e.stopPropagation(),t!==r&&l(t),i||s()},className:a(j.navDot,{[j.selected]:t===r})})))(e,t)))))};function U(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function X(){return X=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{reverse:r,...o}=e;return n.createElement(Ee,t()({},o,{classNames:{enter:xe,enterActive:ge,exit:be,exitActive:ye}}),e.children)},OutIn:e=>{const{reverse:r,...o}=e;return n.createElement(Ee,t()({},o,{classNames:{enter:Ce,enterActive:Se,exit:we,exitActive:ke}}),e.children)},SlideHorizontal:e=>{const{reverse:r,...o}=e;return n.createElement(Ee,t()({},o,{classNames:r?{enter:Ae,enterActive:Te,exit:Re,exitActive:Me}:{enter:Ne,enterActive:Oe,exit:Le,exitActive:Pe}}),e.children)},SlideVertical:e=>{const{reverse:r,...o}=e;return n.createElement(Ee,t()({},o,{classNames:r?{enter:Ve,enterActive:He,exit:Fe,exitActive:_e}:{enter:je,enterActive:De,exit:Ie,exitActive:Be}}),e.children)}};var Ze=e=>{const t=qe[e.type],{type:r,...o}=e;return n.createElement(t,o)};const ze=(e,t)=>{let{isPlaying:r,isSlideShowInViewport:o,reverse:i,transition:s,transitionDuration:l,currentSlideIndex:c,onSlideEntered:u,onSlideExited:d,children:p,dynamicHeight:f,inTransition:h}=e;const v=!o||r&&o?"off":"polite",m="SlideVertical"===s||"SlideHorizontal"===s;return"NoTransition"===s?n.createElement("div",{ref:t,"data-testid":k,className:a(j.slides,f?j.slidesDynamicHeight:void 0),"aria-live":v},p):n.createElement("div",{ref:t,"data-testid":k,"aria-live":v,className:a(j.slides,f?j.slidesDynamicHeight:void 0,h&&m?j.inTransition:void 0)},n.createElement(te,{component:null,childFactory:e=>n.cloneElement(e,{reverse:i})},n.createElement(Ze,{type:s,key:c,timeout:l,onEntered:u,onExited:d,unmountOnExit:!0},p)))};var Ue=n.forwardRef(ze);const Xe=(e,o)=>{const{id:i,className:s,customClassNames:l=[],skin:c,hasShadowLayer:u,translations:d,currentSlideIndex:f,slidesProps:m,showNavigationDots:E,showNavigationButton:x,autoPlay:g,initialAutoPlay:C,showPlaybackControl:S,shouldChangeSlidesOnSwipe:w=!0,autoPlayInterval:k,pauseAutoPlayOnMouseOver:N,transition:O,transitionDuration:R,transitionReverse:D,direction:I,changeSlide:B,reducedMotion:V,children:H,onCurrentSlideChanged:F,onChange:_,onMouseEnter:q,onMouseLeave:U,onClick:X,onDblClick:G,play:J,onPlay:W,pause:$,onPause:Q,isPlaying:Y=g&&n.Children.toArray(H()).length>1&&!V,dynamicSlidesHeight:K=!1,observeChildListChange:ee}=e,{isPaused:te,isHovered:ne,setIsHovered:re,isFocused:oe,setIsPaused:ie,setIsFocused:se,onFocus:ae,playbackControlButtonRef:le}=function(e){let{autoplay:t}=e;const[o,i]=(0,n.useState)(!1),[s,a]=(0,n.useState)(!1),[l,c]=(0,n.useState)(!t),u=r().useRef(null);return{isHovered:o,setIsHovered:i,isFocused:s,onFocus:(0,n.useCallback)((e=>{e.nativeEvent.target!==u.current&&a(!0)}),[a,u]),setIsFocused:a,isPaused:l,setIsPaused:c,playbackControlButtonRef:u}}({autoplay:Y});(0,n.useEffect)((()=>{ie(!Y)}),[Y,ie]);const[ce,ue]=n.useState(!1),[de,pe]=n.useState(!1),fe=n.useRef(null),he=!V&&O!==A,ve=n.useMemo((()=>D?!ce:ce),[ce,D]),me=n.Children.toArray(H()),Ee=g&&me.length>1&&!V,xe=n.useRef(null),ge=!te&&!(ne&&Ee&&N)&&!(oe&&Ee),be=n.useCallback((e=>{let{slideIndex:t,isBackward:n,callback:r}=e;if(de||t===f)"function"==typeof r&&r();else{if(he&&"function"==typeof r&&(xe.current=r),he){pe(!0);ue(!!(void 0===n?t{re(!0),null==q||q(e)}:q,we=Ee&&N?e=>{re(!1),null==U||U(e)}:U,ke=Ee?{onFocus:ae,onBlur:()=>{se(!1)}}:{},Ne=n.useRef(null),Oe=function(e,t){void 0===t&&(t=!1);const[r,o]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{if(!v())return o(t),()=>{};const n=e.current;if(n&&v()){const e=new window.IntersectionObserver((e=>{const t=e[e.length-1];o(t.isIntersecting)}));return e.observe(n),()=>{e.disconnect()}}return()=>{}}),[e,t]),r}(Ne);b("onSwipeLeft",(()=>w&&ye()),Ne),b("onSwipeRight",(()=>w&&Ce()),Ne),function(e,t){const r=(0,n.useRef)((()=>{}));(0,n.useEffect)((()=>{r.current=e}),[e]),(0,n.useEffect)((()=>{if(null!==t){const e=setInterval((function(){r.current()}),t);return()=>clearInterval(e)}return()=>{}}),[t])}(ye,ge&&Oe?k:null);const Le=n.useCallback((()=>({height:{[i]:()=>{const e=document.getElementById(i);return e?e.clientHeight:0}}})),[i]);n.useImperativeHandle(o,(()=>({play:()=>{J(),null==W||W({type:"autoplayOn"})},pause:()=>{$(),null==Q||Q({type:"autoplayOff"})},moveToSlide:be,next:ye,previous:Ce,getCustomMeasures:Le})),[ye,Ce,be,Le,Q,W,$,J]);const Pe="StateBoxSkin"===c?M.root:T.root;return n.useEffect((()=>{ee&&null!=fe&&fe.current&&ee(i,fe.current)}),[]),n.createElement("div",t()({id:i},(e=>Object.entries(e).reduce(((e,[t,n])=>(t.includes("data-")&&(e[t]=n),e)),{}))(e),{ref:Ne,className:a(s,j.slideShowContainer,j[c],"ignore-focus",h(Pe,...l)),role:"region",tabIndex:-1,"aria-label":d.slideShowAriaLabel||y,onClick:X,onDoubleClick:G,onMouseEnter:Se,onMouseLeave:we},ke),x&&n.createElement(Z,{direction:I,skin:c,translations:d,moveToNextSlide:ye,moveToPrevSlide:Ce}),u&&n.createElement("div",{"data-testid":L,className:j.shadowLayer}),n.createElement(Ue,{ref:fe,isPlaying:ge,isSlideShowInViewport:Oe,reverse:ve,transition:V?A:O,transitionDuration:R,currentSlideIndex:f,inTransition:de,onSlideEntered:()=>{he&&pe(!1)},onSlideExited:()=>{null==F||F(f),xe.current&&(xe.current(),xe.current=null)},dynamicHeight:K},me[f]),E&&n.createElement(z,{focusSlideShow:()=>{var e;return null==(e=Ne.current)?void 0:e.focus()},translations:d,slidesProps:m,currentSlideIndex:f,changeSlide:e=>{be({slideIndex:e})}}),S&&C&&n.createElement(p,{buttonRef:le,testId:P,state:te?"paused":"playing",className:j.playbackControl,pauseAriaLabel:d.pauseControlAriaLabel,resumeAriaLabel:d.playControlAriaLabel,onPause:()=>ie(!0),onResume:()=>ie(!1)}))};const Ge=e=>e.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`));var Je;const We={SlideShowContainer:{component:n.forwardRef(Xe),controller:(Je=e=>{let{mapperProps:t,controllerUtils:n,stateValues:r}=e;const{updateProps:o}=n,{reducedMotion:i}=r;return{...t,reducedMotion:i,changeSlide:e=>{o({currentSlideIndex:e})},play:()=>{o({isPlaying:!0})},pause:()=>{o({isPlaying:!1})},observeChildListChange:t.isMasterPage?r.observeChildListChangeMaster:r.observeChildListChange}},{useComponentProps:(e,t,n)=>{const r=(e=>({...e,updateStyles:t=>{const n=Object.entries(t).reduce(((e,[t,n])=>{return{...e,[(r=t,r.startsWith("--")?t:Ge(t))]:void 0===n?null:n};var r}),{});e.updateStyles(n)}}))(n);return Je({mapperProps:e,stateValues:t,controllerUtils:r})}})}}}(),i}()})); //# sourceMappingURL=https://static.parastorage.com/services/editor-elements-library/dist/thunderbolt/rb_wixui.thunderbolt[SlideShowContainer].0afb39e7.bundle.min.js.map